<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 系统配置项
 */
class CreateSysConfig extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sys_configs', function (Blueprint $table) {
            $table->increments('id')->comment('序号');
            $table->string('key', 40)->default('')->comment('配置识别KEY');
            $table->text('val')->comment('配置内容');
            $table->softDeletes();
            $table->timestamps();
            $table->index(['key','deleted_at'], 'index1');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sys_configs');
    }
}
